Integrand size = 21, antiderivative size = 50 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^2 \, dx=\frac {1}{2} \left (a^2+2 b^2\right ) x+\frac {2 a b \sin (c+d x)}{d}+\frac {a^2 \cos (c+d x) \sin (c+d x)}{2 d} \]
[Out]
Time = 0.08 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3873, 2717, 4130, 8} \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^2 \, dx=\frac {1}{2} x \left (a^2+2 b^2\right )+\frac {a^2 \sin (c+d x) \cos (c+d x)}{2 d}+\frac {2 a b \sin (c+d x)}{d} \]
[In]
[Out]
Rule 8
Rule 2717
Rule 3873
Rule 4130
Rubi steps \begin{align*} \text {integral}& = (2 a b) \int \cos (c+d x) \, dx+\int \cos ^2(c+d x) \left (a^2+b^2 \sec ^2(c+d x)\right ) \, dx \\ & = \frac {2 a b \sin (c+d x)}{d}+\frac {a^2 \cos (c+d x) \sin (c+d x)}{2 d}+\frac {1}{2} \left (a^2+2 b^2\right ) \int 1 \, dx \\ & = \frac {1}{2} \left (a^2+2 b^2\right ) x+\frac {2 a b \sin (c+d x)}{d}+\frac {a^2 \cos (c+d x) \sin (c+d x)}{2 d} \\ \end{align*}
Time = 0.17 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.92 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^2 \, dx=\frac {2 \left (a^2+2 b^2\right ) (c+d x)+8 a b \sin (c+d x)+a^2 \sin (2 (c+d x))}{4 d} \]
[In]
[Out]
Time = 0.39 (sec) , antiderivative size = 43, normalized size of antiderivative = 0.86
method | result | size |
risch | \(\frac {a^{2} x}{2}+x \,b^{2}+\frac {2 a b \sin \left (d x +c \right )}{d}+\frac {a^{2} \sin \left (2 d x +2 c \right )}{4 d}\) | \(43\) |
parallelrisch | \(\frac {a^{2} \sin \left (2 d x +2 c \right )+8 a b \sin \left (d x +c \right )+2 \left (a^{2}+2 b^{2}\right ) x d}{4 d}\) | \(43\) |
derivativedivides | \(\frac {a^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+2 a b \sin \left (d x +c \right )+b^{2} \left (d x +c \right )}{d}\) | \(51\) |
default | \(\frac {a^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+2 a b \sin \left (d x +c \right )+b^{2} \left (d x +c \right )}{d}\) | \(51\) |
norman | \(\frac {\left (-\frac {a^{2}}{2}-b^{2}\right ) x +\left (-\frac {a^{2}}{2}-b^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+\left (\frac {a^{2}}{2}+b^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\left (\frac {a^{2}}{2}+b^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}+\frac {2 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{d}-\frac {a \left (a -4 b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{d}-\frac {a \left (4 b +a \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2} \left (-1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )}\) | \(175\) |
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 40, normalized size of antiderivative = 0.80 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^2 \, dx=\frac {{\left (a^{2} + 2 \, b^{2}\right )} d x + {\left (a^{2} \cos \left (d x + c\right ) + 4 \, a b\right )} \sin \left (d x + c\right )}{2 \, d} \]
[In]
[Out]
\[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^2 \, dx=\int \left (a + b \sec {\left (c + d x \right )}\right )^{2} \cos ^{2}{\left (c + d x \right )}\, dx \]
[In]
[Out]
none
Time = 0.20 (sec) , antiderivative size = 47, normalized size of antiderivative = 0.94 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^2 \, dx=\frac {{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} a^{2} + 4 \, {\left (d x + c\right )} b^{2} + 8 \, a b \sin \left (d x + c\right )}{4 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 96 vs. \(2 (46) = 92\).
Time = 0.28 (sec) , antiderivative size = 96, normalized size of antiderivative = 1.92 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^2 \, dx=\frac {{\left (a^{2} + 2 \, b^{2}\right )} {\left (d x + c\right )} - \frac {2 \, {\left (a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 4 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 4 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2}}}{2 \, d} \]
[In]
[Out]
Time = 13.48 (sec) , antiderivative size = 42, normalized size of antiderivative = 0.84 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^2 \, dx=\frac {a^2\,x}{2}+b^2\,x+\frac {a^2\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {2\,a\,b\,\sin \left (c+d\,x\right )}{d} \]
[In]
[Out]